// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2005-1-5

#ifndef __MSVR_CHAT_H_SERVER_SVR_MAIN__
#define __MSVR_CHAT_H_SERVER_SVR_MAIN__

#pragma once

#include <common/svr_base/net_transmit.h>

namespace JoyServer
{

class CJoyMainRoom;

class CJoyRoomChat
{
public:
    CJoyMainRoom*   m_room;

    // predefined messages.
    CJoyTransmitData*   m_chatmsg_chatDisable;
    CJoyTransmitData*   m_chatmsg_chatDelay;
    CJoyTransmitData*   m_chatmsg_badCommand;
    CJoyTransmitData*   m_chatmsg_userNotInRoom;
    CJoyTransmitData*   m_chatmsg_forceNickOn;
    CJoyTransmitData*   m_chatmsg_forceNickOff;
public:
    CJoyRoomChat();
    virtual ~CJoyRoomChat();

    bool Create(CJoyMainRoom* pRoom);
    void Destroy();

    static CJoyTransmitData* BuildChat(UINT srcUserId, UINT dstUserId, bool bPrivateChat, PCSTR pszText, int nTextLen);
};

} // namespace JoyServer

#endif  // __MSVR_CHAT_H_SERVER_SVR_MAIN__